package cn.kgc.shiro02.utils;

import java.util.Random;

/**
 * @author: mosin
 * @version: v1.0  2022/6/1
 */
public class SaltUtil {


    public  static  String getSalt(int size){

        char[] chars = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKZXCVBNM1234567890!@#$%^&*".toCharArray();
        System.out.println(chars.length);
        Random random = new Random();
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i <size ; i++) {
            sb.append(chars[random.nextInt(69)]);
        }
        return  sb.toString();
    }

}
